package rp.lee.callsdecline;

import rp.lee.callsdecline.core.db.model.Pwd;
import rp.lee.callsdecline.core.db.table.PwdTable;
import rp.lee.callsdecline.service.PhoneService;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.telephony.TelephonyManager;

import com.android.internal.telephony.ITelephony;

public class MainActivity extends Activity {
	
	TelephonyManager mTelephonyManager = null;
	ITelephony mITelephony = null;
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        Intent mIntent = new Intent();
        mIntent.setClass(this, PhoneService.class);
        startService(mIntent);
        
        PwdTable table = new PwdTable(this);
        table.open();
        Pwd pwd = table.get();
        table.close();
//        System.out.println(pwd.getGeneralPwd() + ":" + pwd.getSuperPwd());
//        System.out.println(StringUtils.newStringUtf8(Base64.encodeBase64(StringUtils.getBytesUtf8(Constants.DEFAULT_GENERAL_PWD))));
//        System.out.println(StringUtils.newStringUtf8(Base64.encodeBase64(StringUtils.getBytesUtf8(Constants.DEFAULT_SUPER_PWD))));
    }
}